/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package internetplus_test;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;

/**
 *
 * @author luobo
 */
public class CommentTest {
    
    public static void main(String args[]){
//        publishCommentTest();
    }
    
    public static void publishCommentTest(){
         String httpUrl = "http://localhost:8080/InternetPlus/comment/publishComment";
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("aid", "1");
        jsonObject.put("CommentTime", new Date(System.currentTimeMillis()));
        jsonObject.put("CommentContent", "......................");
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("params", jsonObject.toString()));
        InternetRequest.request_postWithoutCookie(httpUrl, params);
    }
    

}
